'use strict';

require.config({
	paths:{
		"jquery":"../lib/jquery/dist/jquery.min"
	}
})

require(['Router','Handler','jquery','nav_toggler'],function(Router,Handler,$,nav_toggler){
	var router = new Router(Handler);
	router.init();

	nav_toggler.init();


	$('#top').bind('click',function(){
		$('html').animate({
			'scrollTop': 0
		});
		$('body').animate({
			'scrollTop': 0
		});
	});


	$(window).bind('scroll',function(){
		if($(window).scrollTop() > 200){
			$('#top').show();
		}else{
			$('#top').hide();
		}
	});

	/*if(!window.location.hash){
		window.location.hash="main";
	}else{
		
	}*/
});